package com.wenkaihu.android.chess.view;

import android.content.Context;
import android.view.Display;
import android.view.MotionEvent;

import com.wenkaihu.android.chess.model.PaceblePoint;
import com.wenkaihu.android.chess.socket.Client;

public class SocketGoBang extends GoBang {

	public SocketGoBang(Context mCtx, Display display) {
		super(mCtx, display);
	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {
		// send the point info to server
		new Thread(new Client(new PaceblePoint((int)event.getX() / ITEM_HIGHT, 
				(int)event.getY() / ITEM_HIGHT, System.currentTimeMillis(), "a"))).start();
		
		return super.onTouchEvent(event);
	}
	
	public void checkAndRefresh(){
		showResult(pieces);
	}
}
